//
//  EntrustfeeTableViewCell.m
//  Fangmm
//
//  Created by ChaoZhou on 16/3/15.
//  Copyright © 2016年 com.fangmm. All rights reserved.
//

#import "EntrustfeeTableViewCell.h"
#import "HomePageUser.h"
#import "Constants.h"
#import "Utility.h"

@implementation EntrustfeeTableViewCell


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)rectCell
{
    NSMutableArray *unPayMenber = [NSMutableArray array];
    for (HomePageUser *member in self.scheduleInfo.menberArray)
    {
        NSLog(@"++%@",member.userName);
        if (member.trustee == NO)
        {
            [unPayMenber addObject:member.userName];
        }
    }
    for (HomePageUser *member in self.scheduleInfo.menberArray)
    {
        if ([member.userId isEqualToString:[Utility getObjectForKey:kUserId]])
        {
            if (member.trustee == NO)
            {
                self.contentLabel.text = @"请支付保证金";
            }
            else if (member.trustee == YES)
            {
                if (unPayMenber.count == 0)
                {
                    self.contentLabel.text = @"小组以全部交纳保证金";
                }
                else if (unPayMenber.count != 0)
                {
                    NSString *labelStr = @"";
                    for (NSString *name in unPayMenber)
                    {
                        labelStr = [NSString stringWithFormat:@"%@ %@",labelStr,name];
                    }
                    self.contentLabel.text = labelStr;
                }
            }
        }
    }
}
@end
